# students/models.py
from sqlalchemy import Column, String, Date, Integer
from ..database import Base


class Student(Base):
    __tablename__ = "students"

    student_id = Column(String(20), primary_key=True, comment="学生编号")
    class_name = Column(String(50), nullable=False, comment="学生班级")
    student_name = Column(String(50), nullable=False, comment="学生姓名")
    hometown = Column(String(100), nullable=True, comment="籍贯")
    graduate_school = Column(String(100), nullable=True, comment="毕业学校")
    major = Column(String(100), nullable=True, comment="专业")
    enrollment_date = Column(Date, nullable=True, comment="入学时间")
    graduation_date = Column(Date, nullable=True, comment="毕业时间")
    education = Column(String(50), nullable=True, comment='学历')
    advisor_id = Column(String(20), nullable=True, comment='顾问编号')
    age = Column(Integer, nullable=True, comment='年龄')
    sex = Column(String(10), nullable=True, comment='性别')